#ifndef CWORKER_CFG_H_
#define CWORKER_CFG_H_

#include "wtk/core/cfg/wtk_local_cfg.h"
#include "wtk/os/wtk_log_cfg.h"

#include "redis/cworker_redis_cfg.h"
#include "script/cworker_script_cfg.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct cworker_cfg {
    uint16_t port;
    wtk_log_cfg_t log;
    cworker_redis_cfg_t redis;
    cworker_script_cfg_t scripts;
} cworker_cfg_t;

int cworker_cfg_init(cworker_cfg_t *);
int cworker_cfg_clean(cworker_cfg_t *);
int cworker_cfg_update_local(cworker_cfg_t *, wtk_local_cfg_t *);
int cworker_cfg_update(cworker_cfg_t *);

#ifdef __cplusplus
};
#endif
#endif
